const { ipcMain } = require("electron");
const { setConfig } = require("../util");

ipcMain.on("setConfig", (event, config) => {
  // console.log("setConfig", config);
  global.config = { ...global.config, ...config };
  // 写入到配置文件中
  setConfig(global.config);
  event.returnValue = "";
});
